/**
 * 常量
 */

import { useI18n } from '@/locales'
const { t } = useI18n()

// 触发类型
const triggerTypeOptions = [
    {
        key: 'TIMING_TRIGGER',
        title: t('attributeFrom.timingTrigger')
    },
    {
        key: 'INSTANT_TRIGGER',
        title: t('attributeFrom.immediateTrigger')
    }
]
// 触发频率
const triggerFrequencyOptions = [
    {
        key: 'ONLY_ONCE',
        title: t('attributeFrom.onlyOnce')
    },
    {
        key: 'PERIOD_TRIGGER',
        title: t('attributeFrom.periodicTrigger')
    }
]

// 待办有效期
const toDoValidityOptions = [
    {
        key: 'INDEFINITELY',
        title: t('attributeFrom.indefinitely')
    },
    {
        key: 'CUSTOMIZE',
        title: t('attributeFrom.custom')
    }
]

const dateType = [
    {
        key: 'HOUR',
        title: t('dateType.time')
    },
    {
        key: 'DAY',
        title: t('dateType.day')
    },
    {
        key: 'WEEK',
        title: t('dateType.week')
    },
    {
        key: 'MONTH',
        title: t('dateType.month')
    },
    {
        key: 'YEAR',
        title: t('dateType.year')
    }
]

// 触发时机
const timingList = [
    {
        key: 'CREATE',
        title: t('attributeFrom.addBtn')
    },
    {
        key: 'EDIT',
        title: t('attributeFrom.editBtn')
    },
    {
        key: 'DELETE',
        title: t('attributeFrom.delBtn')
    }
]

export { triggerTypeOptions, triggerFrequencyOptions, toDoValidityOptions, dateType, timingList }
